﻿using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace Entity
{ 
    public class Slot : BaseUserEnity
    {
        public int cab { get; set; }  //柜子
        public int layer { get; set; }  //层
        public int maxcount { get; set; }  //最大库存 
        public int index { get; set; }  //货道号
        public decimal? price { get; set; }  //温度  
        
        public int count { get; set; }  //库存   
        [MaxLength(128)]
        public string productid { get; set; }  //上平id 
        public int col { get; set; }  //横向占的数目
        public int height { get; set; }  //高度
      
        public string MchId { get; set; }  //用户年龄  
        public SlotState SlotStateId { get; set; }  //货道状态  
        public SlotType SlotTypeId { get; set; }  //ip                          
         
        public string productname { get; set; }  //商品名称 
        [MaxLength(512)]
        public string productimg { get; set; }  //商品图片
        public string productimgmid { get; set; }
        public string productimgmini { get; set; }
        [MaxLength(512)]
        public string productthumbnail { get; set; }//缩略图
        /// <summary>
        ///  缺货阈值
        /// </summary>
        public int? ShortageThreshold { get; set; }
    }
    //[Table("Slot")]
    //public class SlotUpdateModel : IUpdateEntity
    //{

    //    [Key]
    //    public string Id { get; set; }

    //    [MaxLength(128)]
    //    public string UpdateOn { get; set; }

    //    [MaxLength(100)]
    //    public string UpdateBy { get; set; }
 
    //    public int cab { get; set; }  //柜子
    //    public int layer { get; set; }  //层
    //    public int maxcount { get; set; }  //最大库存   
    //    public int  index { get; set; }  //货道号
    //    public decimal  price { get; set; }  //温度  
    //    public int count { get; set; }  //库存   
    //    public string productid { get; set; }  //上平id 
    //    public int col { get; set; }  //横向占的数目
    //    public int height { get; set; }  //高度
    //    public string MchId { get; set; }  //用户年龄
    //    [InEnum(typeof(SlotState))]
    //    public SlotState SlotStateId { get; set; }  //货道状态 
    //    [InEnum(typeof(SlotType))]
    //    public SlotType SlotTypeId { get; set; }  //ip                       

    //}
    public enum SlotState
    {
        可用 = 22001,
        停用 = 22002,
        故障 = 22003
    }

    public enum SlotType
    {
        弹簧货道 = 21001,
        履带 = 21002,
        电磁锁 = 21003,
        

    }
    public enum SlotTypeIn
    {  
        弹簧货道 = 0,
        电磁锁 = 1,
        履带 = 2
    }
}


